/* This example has been placed in the public domain. */
#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include <SDL.h>
#include "fake437.h"

int main(void){
  SDL_Surface *screen;
  SDL_Event ev;
  int x;
  int y;
  int done = 0;
  SDL_Init(SDL_INIT_VIDEO);

  screen = SDL_SetVideoMode(640, 480, 32, 0);
  for(y = 0 ; y < 16 ; y++)
    for(x = 0 ; x < 16 ; x++)
      f437_putChar(screen, 0, 0, x, y,
		   y*16+x, F437_COLOR_BWHITE, F437_COLOR_BLACK);
  SDL_Flip(screen);
  while(!done)
    while(SDL_PollEvent(&ev))
      if((ev.type == SDL_KEYDOWN) &&
	 (ev.key.keysym.sym == SDLK_ESCAPE)) done = 1;

  SDL_Quit();
  return 0;
}
